//-----------------------------------------------------------------
// Button Class
//-----------------------------------------------------------------
#pragma once
class GameEngine;
class DXDevice;
class SpriteRender;
class Sprite;

#include "Caller.h"

class Button : public Caller
{
public:
	Button(const tstring& text, const D3DXVECTOR3& pos, int width, int height, const tstring& name, bool image = true);

	virtual ~Button();

	void SetBounds(int x, int y, int width, int height);
	const tstring& GetText() const;
	void SetText(const tstring& textRef);
	RECT GetRect() const;
	void SetEnabled(bool bEnable);
	void Paint() const;
	void Tick(float dTime);

private:
	// -------------------------
	// Datamembers
	// -------------------------
	D3DXVECTOR3 m_Pos;
	int m_Width, m_Height;
	bool m_Armed;
	tstring m_Text, m_Name;
	bool m_Enabled;
	bool m_Image;
	bool m_Hover;

	Sprite* m_Sprite;
	SpriteRender* m_SpriteRender;

	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------
	Button(const Button& bRef);
	Button& operator=(const Button& bRef);
};
